package com.ruoyi.system.domain;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 【请填写功能名称】对象 entity_rent
 * 
 * @author ruoyi
 * @date 2020-12-27
 */
public class EntityRent extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 客户id */
//    @Excel(name = "客户id")
    private Long customerId;
    /** 客户名称 */
    @Excel(name = "客户名称")
    private String customerName;
    /** 客户地址 */
    @Excel(name = "客户地址")
    private String customerAddress;
    /** customerContacts */
    @Excel(name = "联系人")
    private String customerContacts;
    /** 客户手机号 */
    @Excel(name = "客户手机号")
    private String customerPhone;
    /** 客户座机号 */
    @Excel(name = "客户座机号")
    private String customerTel;
    /** 客户手机号 */
    @Excel(name = "客户身份证号")
    private String customerIdCard;

    /** 出单时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "出单时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date issueTime;

    /** 计划租赁开始日期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "计划租赁开始日期时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date planRentStartTime;

    /** 实际租赁开始日期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "实际租赁开始日期时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date actualRentStartTime;

    /** 计划租赁结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "计划租赁结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date planRentEndTime;

    /** 实际租赁结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "实际租赁结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date actualRentEndTime;

    /** 计划租赁天数 */
    @Excel(name = "计划租赁天数")
    private Integer planRentSpan;

    /** 实际租赁天数 */
    @Excel(name = "实际租赁天数")
    private Integer actualRentSpan;

    /** 备注 */
    @Excel(name = "备注")
    private String note;

    /** 有效性：0 无效 1有效 */
    @Excel(name = "有效性")
    private Integer valid;
    /** 出库单号 */
    @Excel(name = "出库单号")
    private String rentNumber;
    /** 有效出租设备 */
    private List<EntityRentDeviceLinkCollect> validRentDevice;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setCustomerId(Long customerId) 
    {
        this.customerId = customerId;
    }

    public Long getCustomerId() 
    {
        return customerId;
    }
    public void setIssueTime(Date issueTime) 
    {
        this.issueTime = issueTime;
    }

    public Date getIssueTime() 
    {
        return issueTime;
    }
    public void setPlanRentStartTime(Date planRentStartTime) {
        this.planRentStartTime = planRentStartTime;
    }

    public Date getPlanRentStartTime() 
    {
        return planRentStartTime;
    }
    public void setActualRentStartTime(Date actualRentStartTime) {
        this.actualRentStartTime = actualRentStartTime;
    }

    public Date getActualRentStartTime() 
    {
        return actualRentStartTime;
    }
    public void setPlanRentEndTime(Date planRentEndTime) {
        this.planRentEndTime = planRentEndTime;
    }

    public Date getPlanRentEndTime() 
    {
        return planRentEndTime;
    }
    public void setActualRentEndTime(Date actualRentEndTime) {
        this.actualRentEndTime = actualRentEndTime;
    }

    public Date getActualRentEndTime() 
    {
        return actualRentEndTime;
    }
    public void setPlanRentSpan(Integer planRentSpan) {
        this.planRentSpan = planRentSpan;
    }

    public Integer getPlanRentSpan() 
    {
        return planRentSpan;
    }
    public void setActualRentSpan(Integer actualRentSpan) {
        this.actualRentSpan = actualRentSpan;
    }

    public Integer getActualRentSpan() 
    {
        return actualRentSpan;
    }
    public void setNote(String note) {
        if(!StringUtils.isEmpty(note)){
            this.note = note;
        }
    }

    public String getNote() 
    {
        return note;
    }
    public void setValid(Integer valid)
    {
        this.valid = valid;
    }

    public Integer getValid()
    {
        return valid;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getCustomerAddress() {
        return customerAddress;
    }

    public void setCustomerAddress(String customerAddress) {
        this.customerAddress = customerAddress;
    }

    public String getCustomerPhone() {
        return customerPhone;
    }

    public void setCustomerPhone(String customerPhone) {
        this.customerPhone = customerPhone;
    }

    public String getCustomerTel() {
        return customerTel;
    }

    public void setCustomerTel(String customerTel) {
        this.customerTel = customerTel;
    }

    public String getCustomerIdCard() {
        return customerIdCard;
    }

    public void setCustomerIdCard(String customerIdCard) {
        this.customerIdCard = customerIdCard;
    }


    private Date issueTimeStart;
    private Date issueTimeEnd;

    private Date planRentStartTimeStart;
    private Date planRentStartTimeEnd;

    private Date planRentEndTimeStart;
    private Date planRentEndTimeEnd;

    private Date actualRentStartTimeStart;
    private Date actualRentStartTimeEnd;

    private Date actualRentEndTimeStart;
    private Date actualRentEndTimeEnd;

    private Integer planRentSpanStart;
    private Integer planRentSpanEnd;

    private Integer actualRentSpanStart;
    private Integer actualRentSpanEnd;

    public Date getIssueTimeStart() {
        return issueTimeStart;
    }

    public void setIssueTimeStart(Date issueTimeStart) {
        this.issueTimeStart = issueTimeStart;
    }

    public Date getIssueTimeEnd() {
        return issueTimeEnd;
    }

    public void setIssueTimeEnd(Date issueTimeEnd) {
        this.issueTimeEnd = issueTimeEnd;
    }

    public Date getPlanRentStartTimeStart() {
        return planRentStartTimeStart;
    }

    public void setPlanRentStartTimeStart(Date planRentStartTimeStart) {
        this.planRentStartTimeStart = planRentStartTimeStart;
    }

    public Date getPlanRentStartTimeEnd() {
        return planRentStartTimeEnd;
    }

    public void setPlanRentStartTimeEnd(Date planRentStartTimeEnd) {
        this.planRentStartTimeEnd = planRentStartTimeEnd;
    }

    public Date getPlanRentEndTimeStart() {
        return planRentEndTimeStart;
    }

    public void setPlanRentEndTimeStart(Date planRentEndTimeStart) {
        this.planRentEndTimeStart = planRentEndTimeStart;
    }

    public Date getPlanRentEndTimeEnd() {
        return planRentEndTimeEnd;
    }

    public void setPlanRentEndTimeEnd(Date planRentEndTimeEnd) {
        this.planRentEndTimeEnd = planRentEndTimeEnd;
    }

    public Date getActualRentStartTimeStart() {
        return actualRentStartTimeStart;
    }

    public void setActualRentStartTimeStart(Date actualRentStartTimeStart) {
        this.actualRentStartTimeStart = actualRentStartTimeStart;
    }

    public Date getActualRentStartTimeEnd() {
        return actualRentStartTimeEnd;
    }

    public void setActualRentStartTimeEnd(Date actualRentStartTimeEnd) {
        this.actualRentStartTimeEnd = actualRentStartTimeEnd;
    }

    public Date getActualRentEndTimeStart() {
        return actualRentEndTimeStart;
    }

    public void setActualRentEndTimeStart(Date actualRentEndTimeStart) {
        this.actualRentEndTimeStart = actualRentEndTimeStart;
    }

    public Date getActualRentEndTimeEnd() {
        return actualRentEndTimeEnd;
    }

    public void setActualRentEndTimeEnd(Date actualRentEndTimeEnd) {
        this.actualRentEndTimeEnd = actualRentEndTimeEnd;
    }

    public Integer getPlanRentSpanStart() {
        return planRentSpanStart;
    }

    public void setPlanRentSpanStart(Integer planRentSpanStart) {
        this.planRentSpanStart = planRentSpanStart;
    }

    public Integer getPlanRentSpanEnd() {
        return planRentSpanEnd;
    }

    public void setPlanRentSpanEnd(Integer planRentSpanEnd) {
        this.planRentSpanEnd = planRentSpanEnd;
    }

    public Integer getActualRentSpanStart() {
        return actualRentSpanStart;
    }

    public void setActualRentSpanStart(Integer actualRentSpanStart) {
        this.actualRentSpanStart = actualRentSpanStart;
    }

    public Integer getActualRentSpanEnd() {
        return actualRentSpanEnd;
    }

    public void setActualRentSpanEnd(Integer actualRentSpanEnd) {
        this.actualRentSpanEnd = actualRentSpanEnd;
    }

    private List<RentDeviceLink> rentDeviceList = new ArrayList<RentDeviceLink>();

    public List<RentDeviceLink> getRentDeviceList() {
        return rentDeviceList;
    }

    public void setRentDeviceList(List<RentDeviceLink> rentDeviceList) {
        this.rentDeviceList = rentDeviceList;
    }

    public String getRentNumber() {
        return rentNumber;
    }

    public void setRentNumber(String rentNumber) {
        this.rentNumber = rentNumber;
    }

    public List<EntityRentDeviceLinkCollect> getValidRentDevice() {
        return validRentDevice;
    }

    public void setValidRentDevice(List<EntityRentDeviceLinkCollect> validRentDevice) {
        this.validRentDevice = validRentDevice;
    }

    public String getCustomerContacts() {
        return customerContacts;
    }

    public void setCustomerContacts(String customerContacts) {
        this.customerContacts = customerContacts;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("rentNumber", getRentNumber())
            .append("customerId", getCustomerId())
            .append("customerName", getCustomerName())
            .append("customerContacts", getCustomerContacts())
            .append("customerPhone", getCustomerPhone())
            .append("customerTel", getCustomerTel())
            .append("customerAddress", getCustomerAddress())
            .append("customerIdCard", getCustomerIdCard())
            .append("issueTime", getIssueTime())
            .append("planRentStartTime", getPlanRentStartTime())
            .append("actualRentStartTime", getActualRentStartTime())
            .append("planRentEndTime", getPlanRentEndTime())
            .append("actualRentEndTime", getActualRentEndTime())
            .append("planRentSpan", getPlanRentSpan())
            .append("actualRentSpan", getActualRentSpan())
            .append("note", getNote())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("valid", getValid())
            .append("rentDeviceList", getRentDeviceList().toString())
            .append("validRentDevice", getValidRentDevice().toString())
            .toString();
    }
}
